-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feat: controller #45
base: main
Are you sure you want to change the base?
Feat: controller #45
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am thinking, it would be better to just combine tracker extensions and controller extensions to a simply PlayerExtension
(suggest better name if you can think any)
because to me, it seems excessive to have so many types of different extensions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be better if you use this class here. (you can move this class to common package)
echo/app/src/main/java/dev/brahmkshatriya/echo/viewmodels/SnackBar.kt
Lines 32 to 35 in 946c84d
data class Message( | |
val message: String, | |
val action: Action? = null | |
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and also using MutableSharedFlow<Message>
instead of those functions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rename to onClose()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I recommend using MutableSharedFlow<T>
instead of suspend (t: T) -> Unit
for all the var on...Request
, and converting this abstract class to an interface.
you can see how MutableSharedFlow
works here: https://developer.android.com/kotlin/flow/stateflow-and-sharedflow#sharedflow
Also, it'd be better if you move all data classes and enums to models
package
Thanks again for the PR! |
Fixes:
onExtensionSelected
on disabled extensions other than musicSettingTextInput
not updating the shown value immediately after settingAdditions
MessagePostClient
mutableMessageFlow
to post messages other than errorsCloseableClient
ControllerClient
examples:
Echo Song Skipper
Echo Remote Control